home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEattachSurfaceTemplate.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.4 KB  |  103 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //
  20. //  Creation Date:    June 11, 1997
  21. //  Author:        sw
  22. //
  23. //  Procedure Name:
  24. //    AEattachSurfaceTemplate
  25. //
  26. //  Description Name;
  27. //    Creates the attribute editor controls for the attachSurface Node
  28. //
  29. //  Input Value:
  30. //    nodeName 
  31. //
  32. //  Output Value:
  33. //    None
  34. // 
  35.  
  36.  
  37. global proc attachSurfaceBlendKnotInsertionControls( string $nodeName )
  38. {
  39.     int $m = `getAttr ($nodeName + ".blendKnotInsertion")`;
  40.     if( 0 == $m ) {
  41.         editorTemplate -dimControl $nodeName "parameter" true;
  42.     }
  43.     else {
  44.         editorTemplate -dimControl $nodeName "parameter" false;
  45.     }
  46. }
  47.  
  48. global proc attachSurfaceMethodControls( string $nodeName )
  49. {
  50.     int $m = `getAttr ($nodeName + ".method")`;
  51.     if( 0 == $m ) {
  52.         editorTemplate -dimControl $nodeName "keepMultipleKnots" false;
  53.         editorTemplate -dimControl $nodeName "blendBias" true;
  54.         editorTemplate -dimControl $nodeName "blendKnotInsertion" true;
  55.         editorTemplate -dimControl $nodeName "parameter" true;
  56.     }
  57.     else {
  58.         editorTemplate -dimControl $nodeName "keepMultipleKnots" true;
  59.         editorTemplate -dimControl $nodeName "blendBias" false;
  60.         editorTemplate -dimControl $nodeName "blendKnotInsertion" false;
  61.         attachSurfaceBlendKnotInsertionControls( $nodeName );
  62.     }
  63. }
  64.  
  65. global proc AEattachSurfaceTemplate ( string $nodeName )
  66. {
  67.     editorTemplate -beginScrollLayout;
  68.         editorTemplate -beginLayout "Attach Surface History" -collapse 0;
  69.             editorTemplate -callCustom "AEinputNew \"InputSurface 1\""
  70.                     "AEinputReplace \"Input Surface 1\""
  71.                     "inputSurface1";
  72.             editorTemplate -callCustom "AEinputNew \"InputSurface 2\""
  73.                     "AEinputReplace \"Input Surface 2\""
  74.                     "inputSurface2";
  75.  
  76.             editorTemplate -addControl "method" "attachSurfaceMethodControls";
  77.  
  78.             editorTemplate -addControl "blendBias";
  79.             editorTemplate -addControl "blendKnotInsertion"
  80.                 "attachSurfaceBlendKnotInsertionControls";
  81.             editorTemplate -addControl "parameter";
  82.  
  83.             editorTemplate -addControl "keepMultipleKnots";
  84.             editorTemplate -addControl "directionU";
  85.             editorTemplate -addControl "reverse1";
  86.             editorTemplate -addControl "reverse2";
  87.             editorTemplate -addControl "swap1";
  88.             editorTemplate -addControl "swap2";
  89.             editorTemplate -addControl "twist";
  90.  
  91.         editorTemplate -endLayout;
  92.  
  93.         // suppressed attributes
  94.         editorTemplate -suppress "inputSurface1";    
  95.          editorTemplate -suppress "inputSurface2";    
  96.  
  97.         // include/call base class/node attributes
  98.         AEabstractBaseCreateTemplate $nodeName;
  99.  
  100.     editorTemplate -addExtraControls;
  101.     editorTemplate -endScrollLayout;
  102. }
  103.